fix: improve actionable fix guidance for transitive dependency findings#252
Merged
sonukapoor merged 9 commits intomainfrom Apr 29, 2026
Merged
fix: improve actionable fix guidance for transitive dependency findings#252sonukapoor merged 9 commits intomainfrom
sonukapoor merged 9 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Improves user-facing guidance for transitive vulnerability findings by replacing vague/misleading upgrade instructions with clearer Tier 2/3 messaging, centralizing “primary parent” derivation, and improving how urgent fix-plan sections render parent-upgrade targets.
Changes:
- Extracts
getPrimaryParentintosrc/utils/finding.tsand updates call sites to use it. - Updates formatter and remediation messaging for transitive findings when no validated parent upgrade target is known (Tier 2) or no dependency path exists (Tier 3).
- Fixes urgent fix-command printing to render parent-upgrade targets in their own table with a Context column (rather than blending into the direct-upgrade table).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/output.test.ts | Adds/updates tests for getPrimaryParent, Tier 2/3 messaging, skip reasons, and urgent Context-column rendering. |
| src/utils/finding.ts | Introduces shared getPrimaryParent helper for finding dependency-path parent extraction. |
| src/remediation/fix-commands.ts | Improves skipped-reason text for transitive findings based on parent/path availability. |
| src/output/printers.ts | Updates urgent fix-plan printing to separate direct vs parent-upgrade targets and adds wider Context column support. |
| src/output/formatters.ts | Replaces formatter-level parent derivation and updates Tier 2/3 recommended/summary messages. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ct and priority output
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces vague and misleading fix messages for transitive findings with honest, actionable guidance across all output surfaces.
Three tiers of improvement based on how much data is available:
npm install parent@versionwith a new Context column showing which vulnerable package is resolvedgetRecommendedAction,summarizeNextAction, and the fix plan skip reason now name the parent and say "no safe version was identified automatically — check for a release that resolves pkg to X+"Also extracts
getPrimaryParenttosrc/utils/finding.tsso both the output and remediation layers can use it without a circular import, and fixes the urgent-section printer to render parent-upgrade targets with the Context column rather than silently merging them into the direct-upgrade table.Closes #251